<html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<head>
    <title>首页</title>
</head>
<body>
<h2>Hello World!</h2>

<h2>学生管理系统</h2>
<table>
    <tr>
        <th>学号</th>
        <th>姓名</th>
        <th>密码</th>
        <th>年龄</th>
        <th>性别</th>
        <th>生日</th>
        <th>地址</th>
    </tr>

    <c:forEach items="${list}" var="student">
        <tr>
            <td>${student.cid}</td>
            <td>${student.name}</td>
            <td>${student.password}</td>
            <td>${student.age}</td>
            <td>${student.sex}</td>
            <td>${student.birthday}</td>
            <td>${student.address}</td>
            <td>
                <a href="${pageContext.request.contextPath}/student/show?cid=${student.cid}">
                    <button>修改</button>
                </a>
            </td>
            <td>
                <a href="${pageContext.request.contextPath}/student/delete?cid=${student.cid}">
                    <button>删除</button>
                </a>
            </td>
        </tr>
    </c:forEach>
</table>
<br>
<a href="${pageContext.request.contextPath}/add.jsp">
    <button>增加</button>
</a>

</body>


</html>
